<#if ctrl.getXDataPSControl()??>
<#assign xDataControl = ctrl.getXDataPSControl() />
    <#if xDataControl.getNavPSAppView()??>

    /**
     * 导航视图名称
     *
     * @type {string}
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
    public navViewName: string = '${srffilepath2(xDataControl.getNavPSAppView().getCodeName())}';
    </#if>
    <#if xDataControl.getNavFilter()??>

    /**
     * 导航过滤项
     *
     * @type {string}
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
    public navFilter: string = '${xDataControl.getNavFilter()}';
    </#if>
    <#if xDataControl.getNavPSDER()??>

    /**
     * 导航关系
     *
     * @type {string}
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
    public navPSDer: string = 'n_${xDataControl.getNavPSDER().getPSPickupDEField().getCodeName()?lower_case}_eq';
    </#if>
    <#if xDataControl.getPSNavigateContexts?? && xDataControl.getPSNavigateContexts()??>

    /**
     * 导航上下文参数
     *
     * @type {*}
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
    public navigateContext: any = <@getNavigateContext xDataControl />;
    </#if>
    <#if xDataControl.getPSNavigateParams?? && xDataControl.getPSNavigateParams()??>

    /**
     * 导航视图参数
     *
     * @type {*}
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
    public navigateParams:any = <@getNavigateParams xDataControl />;
    </#if>
</#if>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
    <#list ctrl.getPSControls() as childCtrl>
        <#if childCtrl.getControlType() == 'TOOLBAR'>
            <#assign expbarToolbar = childCtrl/>
            <#if expbarToolbar.getName() != 'toolbar'>
                <#assign toolbarModelsName>${expbarToolbar.getCodeName()?lower_case}Models</#assign>
            <#else>
                <#assign toolbarModelsName = 'toolBarModels' />
            </#if>
            <#break>
        </#if>
    </#list>
</#if>
<#if expbarToolbar??>

    /**
     * 计算导航工具栏按钮状态
     *
     * @param {boolean} state
     * @param {*} models
     * @memberof ${srfclassname('${ctrl.codeName}')}Base
     */
    public calcToolbarItemState(state: boolean, models?: any) {
        const curUIService:any  = <#if appde??>new ${srfclassname('${appde.getCodeName()}')}UIService()<#else>null</#if>;
        super.calcToolbarItemState(state, this.${toolbarModelsName},curUIService);
    }
</#if>

    /**
    * 刷新
    *
    * @memberof ${srfclassname('${ctrl.codeName}')}Base
    */
    public refresh(args?: any): void {
    <#if ctrl.getXDataPSControl?? && ctrl.getXDataPSControl()??>
    <#assign dataControl = ctrl.getXDataPSControl() />
        const refs: any = this.$refs;
        if (refs && refs.${dataControl.name}) {
            refs.${dataControl.name}.refresh();
        }
    </#if>
    }
